<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;utmpx.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_010_331">&nbsp;</a>NAME</h4><blockquote>
utmpx.h - user accounting database definitions
</blockquote><h4><a name = "tag_000_010_332">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;utmpx.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_010_333">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>&lt;utmpx.h&gt;</i>
header defines the
<b>utmpx</b>
structure that includes at least the following members:
<pre>
<code>
char           ut_user[]  user login name
char           ut_id[]    unspecified initialisation process identifier
char           ut_line[]  device name
pid_t          ut_pid     process id
short int      ut_type    type of entry
struct timeval ut_tv      time entry was made
</code>
</pre>
<p>
The 
<b>pid_t</b>
type is defined through
<b>typedef</b>
as described in
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.
<p>
The
<b>timeval</b>
structure is defined as described in
<i><a href="systime.h.html">&lt;sys/time.h&gt;</a></i>.
<p>
Inclusion of the
<i>&lt;utmpx.h&gt;</i>
header may also make visible all symbols
from
<i><a href="systime.h.html">&lt;sys/time.h&gt;</a></i>.
<p>
The following symbolic constants are defined as possible values for the
<b>ut_type</b> member of the <b>utmpx</b> structure:
<dl compact>

<dt>EMPTY<dd>
No valid user accounting information.

<dt>BOOT_TIME<dd>
Identifies time of system boot.

<dt>OLD_TIME<dd>
Identifies time when system clock changed.

<dt>NEW_TIME<dd>
Identifies time after system clock changed.

<dt>USER_PROCESS<dd>
Identifies a process.

<dt>INIT_PROCESS<dd>
Identifies a process spawned by the init process.

<dt>LOGIN_PROCESS<dd>
Identifies the session leader of a logged in user.

<dt>DEAD_PROCESS<dd>
Identifies a session leader who has exited.

</dl>
<p>
The following are declared as functions and may also be defined as macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
void          <a href="endutxent.html">endutxent</a>(void);
struct utmpx *<a href="getutxent.html">getutxent</a>(void);
struct utmpx *<a href="getutxid.html">getutxid</a>(const struct utmpx *);
struct utmpx *<a href="getutxline.html">getutxline</a>(const struct utmpx *);
struct utmpx *<a href="pututxline.html">pututxline</a>(const struct utmpx *);
void          <a href="setutxent.html">setutxent</a>(void);
</code>
</pre>
</blockquote><h4><a name = "tag_000_010_334">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_010_335">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_010_336">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="endutxent.html">endutxent()</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
